<?php  $form=$this->beginWidget('bootstrap.widgets.TbActiveForm',array(
        'id'=>'search-purchase-requisition-form',
	'action'=>Yii::app()->createUrl($this->route),
	'method'=>'get',
));  ?>


	<?php echo $form->textFieldRow($model,'id',array('class'=>'span5','maxlength'=>19)); ?>

	<?php echo $form->textFieldRow($model,'purchase_requisition_number',array('class'=>'span5','maxlength'=>100)); ?>

	<?php echo $form->textFieldRow($model,'trans_date',array('class'=>'span5')); ?>

	<?php echo $form->textFieldRow($model,'id_section',array('class'=>'span5','maxlength'=>50)); ?>

	<?php echo $form->textFieldRow($model,'note',array('class'=>'span5','maxlength'=>255)); ?>

	<?php echo $form->textFieldRow($model,'id_parts',array('class'=>'span5','maxlength'=>19)); ?>

	<?php echo $form->textFieldRow($model,'part_name',array('class'=>'span5','maxlength'=>255)); ?>

	<?php echo $form->textFieldRow($model,'part_description',array('class'=>'span5','maxlength'=>255)); ?>

	<?php echo $form->textFieldRow($model,'part_specs',array('class'=>'span5','maxlength'=>255)); ?>

	<?php echo $form->textFieldRow($model,'qty',array('class'=>'span5','maxlength'=>19)); ?>

	<?php echo $form->textFieldRow($model,'uom',array('class'=>'span5','maxlength'=>50)); ?>

	<?php echo $form->textFieldRow($model,'expected_received_date',array('class'=>'span5')); ?>

	<?php echo $form->textFieldRow($model,'remarks',array('class'=>'span5','maxlength'=>255)); ?>

	<?php echo $form->textFieldRow($model,'status',array('class'=>'span5')); ?>

	<?php echo $form->textFieldRow($model,'created',array('class'=>'span5')); ?>

	<?php echo $form->textFieldRow($model,'created_by',array('class'=>'span5')); ?>

	<?php echo $form->textFieldRow($model,'modified',array('class'=>'span5')); ?>

	<?php echo $form->textFieldRow($model,'modified_by',array('class'=>'span5')); ?>

	<?php echo $form->textFieldRow($model,'budget_number',array('class'=>'span5','maxlength'=>50)); ?>

	<?php echo $form->textFieldRow($model,'revised_from',array('class'=>'span5','maxlength'=>100)); ?>

	<?php echo $form->textFieldRow($model,'app1_by',array('class'=>'span5','maxlength'=>19)); ?>

	<?php echo $form->textFieldRow($model,'app1_date',array('class'=>'span5')); ?>

	<?php echo $form->textFieldRow($model,'app2_by',array('class'=>'span5','maxlength'=>19)); ?>

	<?php echo $form->textFieldRow($model,'app2_date',array('class'=>'span5')); ?>

	<?php echo $form->textFieldRow($model,'app3_by',array('class'=>'span5','maxlength'=>19)); ?>

	<?php echo $form->textFieldRow($model,'app3_date',array('class'=>'span5')); ?>

	<?php echo $form->textFieldRow($model,'app4_by',array('class'=>'span5','maxlength'=>19)); ?>

	<?php echo $form->textFieldRow($model,'app4_date',array('class'=>'span5')); ?>

	<?php echo $form->textFieldRow($model,'app5_by',array('class'=>'span5','maxlength'=>19)); ?>

	<?php echo $form->textFieldRow($model,'app5_date',array('class'=>'span5')); ?>

	<?php echo $form->textFieldRow($model,'app6_by',array('class'=>'span5','maxlength'=>19)); ?>

	<?php echo $form->textFieldRow($model,'app6_date',array('class'=>'span5')); ?>

	<?php echo $form->textFieldRow($model,'part_code',array('class'=>'span5','maxlength'=>50)); ?>

	<?php echo $form->textFieldRow($model,'price',array('class'=>'span5')); ?>

	<?php echo $form->textFieldRow($model,'currency',array('class'=>'span5','maxlength'=>50)); ?>

	<?php echo $form->textFieldRow($model,'status_po',array('class'=>'span5','maxlength'=>50)); ?>

	<?php echo $form->textFieldRow($model,'supplier_code',array('class'=>'span5','maxlength'=>50)); ?>

	<?php echo $form->textFieldRow($model,'reject_date',array('class'=>'span5')); ?>

	<?php echo $form->textFieldRow($model,'pending_date',array('class'=>'span5')); ?>

	<?php echo $form->textFieldRow($model,'budget_price',array('class'=>'span5','maxlength'=>19)); ?>

	<?php echo $form->textFieldRow($model,'data_reject_remark',array('class'=>'span5','maxlength'=>250)); ?>

	<div class="form-actions">
		<?php $this->widget('bootstrap.widgets.TbButton', array('buttonType'=>'submit', 'type'=>'primary', 'icon'=>'search white', 'label'=>'Search')); ?>
               <?php $this->widget('bootstrap.widgets.TbButton', array('buttonType'=>'button', 'icon'=>'icon-remove-sign white', 'label'=>'Reset', 'htmlOptions'=>array('class'=>'btnreset btn-small'))); ?>
	</div>

<?php $this->endWidget(); ?>


<?php $cs = Yii::app()->getClientScript();
$cs->registerCoreScript('jquery');
$cs->registerCoreScript('jquery.ui');
$cs->registerCssFile(Yii::app()->request->baseUrl.'/css/bootstrap/jquery-ui.css');
?>	
   <script>
	$(".btnreset").click(function(){
		$(":input","#search-purchase-requisition-form").each(function() {
		var type = this.type;
		var tag = this.tagName.toLowerCase(); // normalize case
		if (type == "text" || type == "password" || tag == "textarea") this.value = "";
		else if (type == "checkbox" || type == "radio") this.checked = false;
		else if (tag == "select") this.selectedIndex = "";
	  });
	});
   </script>

